<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<?php include_http_metas() ?>
<?php include_metas() ?>
<?php include_title() ?>
<?php //Ich weiß, dass es scheisse ist, aber es funktioniert: ?>
<link rel="shortcut icon" href="http://tkk.bplaced.net/documentroot/web/favicon.ico" />
<?php include_stylesheets() ?>
<?php include_javascripts() ?>
<script type="text/javascript">
<!--
$(document).ready(function(){
    $('#switcher').themeswitcher();
    $( "#import-button" ).button({ icons: {primary:'ui-icon-home', secondary:'ui-icon-triangle-1-e'} });
    $( "#sellwish-button" ).button({ icons: {primary:'ui-icon-cart', secondary:'ui-icon-triangle-1-e'} });
    $( "#production-button" ).button({ icons: {primary:'ui-icon-locked', secondary:'ui-icon-triangle-1-e'} });
    $( "#export-button" ).button({ icons: {primary:'ui-icon-document'} });

    $( "#resetswitcherbutton" ).click(function() {  
	    /*e.preventDefault();*/
	    // remove the ui-theme external stylesheet
	    $('head > link.ui-theme').remove();
	    // nullify the ui-theme's cookie
	    $.cookie('jquery-ui-theme', null);
	    // reset the theme roller text to the initialText option
	    //$(tsSelectors.title).html(options.initialText);
   	 });
  });

  
$(function() {
	//$( ".menubutton" ).button();
	<?php $percentage = $sf_user->getAttribute('progress'); ?>
	<?php if ($percentage>=0):?>
	$( "#progress" ).progressbar({
		value: <?php echo $percentage ?>
	});
	<?php endif; ?>
});
//-->
</script>
</head>
<body>
	<script type="text/javascript"
		src="http://jqueryui.com/themeroller/themeswitchertool/">
</script>
	<div id="wrapper">
		<div class="head">
			<div class="menu ui-state-default">
				<div id="resetswitcher">
					<button id="resetswitcherbutton">Reset</button>
				</div>
				<div id="switcher"></div>
				<ul>
					<li><a class="menubutton" id="import-button"
						href="<?php echo url_for('import/index')?>">Import</a>
					</li>
					<li><a class="menubutton" id="sellwish-button"
						href="<?php echo url_for('sellwish/index')?>">Verkaufswunsch</a></li>
					<li><a class="menubutton" id="production-button"
						href="<?php echo url_for('production/safetystock')?>">Sicherheitsbestand</a>
					</li>
					<li><a class="menubutton" id="export-button"
						href="<?php echo url_for('overview/index')?>">Export</a>
					</li>
				</ul>
			</div>
		</div>
		<!--  <div id="switcher"></div> -->
		<div id="progress-wrapper" class="ui-widget-content">
			<div>
				Fortschritt: <span id="progresstext"><?php echo $percentage ?> </span>
				%
			</div>
			<div id="progress"></div>
		</div>
		<div class="page">
			<div class="content">
				<?php if ($sf_user->hasFlash('notice')): ?>
				<div class="ui-widget">
					<div class="ui-state-highlight ui-corner-all" id="message">
						<p>
						<?php echo $sf_user->getFlash('notice') ?>
						</p>
					</div>
				</div>
				<?php endif ?>
				<?php if ($sf_user->hasFlash('error')): ?>
				<div class="ui-widget">
					<div class="ui-state-error ui-corner-all" id="message">
						<p>
						<?php echo $sf_user->getFlash('error') ?>
						</p>
					</div>
				</div>
				<?php endif ?>
				<h1 class="ui-widget-header ui-corner-all">
				<?php include_slot('page-title'); ?>
				</h1>

				<?php echo $sf_content ?>
			</div>
		</div>
		<div class="footer ui-state-default">PPS-Tool Copyright 2011 Gruppe 4 | <?php echo link_to("Impressum","overview/impressum")?></div>
	</div>
</body>
</html>
